/* creat.c
 *	Simple program to test whether creating program works.
 *	
 *	Creates a file if all is well
 *
 */

#include "syscall.h"

char buff[10000];

int
main()
{
    int id = open("newfile.txt");

    int dstId = creat("copyfile.txt");

    int amount;
    while ((amount = read(id,buff,10000)) != 0)
        write(dstId,buff,amount);

    halt();
}

